package com.ebao.po.user;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ebao.po.doctor.TDoctor;

/**
 * @desc 用户挂号  类似于订单
 * @author snow
 * @date 2012-6-29
 */
@Entity
@Table(name = "T_Register")
public class TRegister implements Serializable {

	private static final long serialVersionUID = 5760666656152798163L;
	
	private Long id;
	private TUser user;				// 用户
	private TDoctor doctor;			// 大夫
	private float fee;				// 挂号费
	private boolean isPay;			// 是否已支付
	private Integer queueNum;		// 当前在队列中排位数,未支付不加入队列
	private Integer status;			// 状态,-1未支付,0已支付等待中,1已看,2作废(超过2小时未支付就作废)
	private String theDate;			// 挂号日期
	
	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(optional = false, targetEntity = TUser.class)
	@JoinColumn(name = "user_id")
	public TUser getUser() {
		return user;
	}

	public void setUser(TUser user) {
		this.user = user;
	}

	@ManyToOne(optional = false, targetEntity = TDoctor.class)
	@JoinColumn(name = "doctor_id")
	public TDoctor getDoctor() {
		return doctor;
	}

	public void setDoctor(TDoctor doctor) {
		this.doctor = doctor;
	}

	public float getFee() {
		return fee;
	}

	public void setFee(float fee) {
		this.fee = fee;
	}

	public boolean isPay() {
		return isPay;
	}

	public void setPay(boolean isPay) {
		this.isPay = isPay;
	}
	
	public Integer getQueueNum() {
		return queueNum;
	}

	public void setQueueNum(Integer queueNum) {
		this.queueNum = queueNum;
	}

	@Column(length = 1)
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(length = 19)
	public String getTheDate() {
		return theDate;
	}

	public void setTheDate(String theDate) {
		this.theDate = theDate;
	}

}
